<!DOCTYPE html>

<html lang="it">

    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <title>Eventi Jesolo 2013 - Movimento Giovanile Salesiano</title>

        <link rel="stylesheet" href="<?= Site::APP_URL ?>bootstrap/css/bootstrap.min.css" />
        <link rel="stylesheet" href="<?= Site::APP_URL ?>css/base.css" />
        <link rel="stylesheet" href="<?= Site::APP_URL ?>js/slider/style.css" />
        <link rel="apple-touch-icon" href="<?= Site::APP_URL ?>img/touch-icon-iphone.png" />
        <link rel="apple-touch-icon" sizes="72x72" href="<?= Site::APP_URL ?>img/touch-icon-ipad.png" />
        <link rel="apple-touch-icon" sizes="114x114" href="<?= Site::APP_URL ?>img/touch-icon-iphone-retina.png" />
        <link rel="apple-touch-icon" sizes="144x144" href="<?= Site::APP_URL ?>img/touch-icon-ipad-retina.png" />
        <!--[if lt IE 9]>
                <link rel="stylesheet" href="<?= Site::APP_URL ?>css/ie-fix.css" />
        <![endif]-->
        <style>
            .TB_Wrapper {
		max-width: 1170px;
		height: 300px;  
            }
            .btn-admin {
                margin: 15px 0px 15px 0px;
            }
            .btn-read {
                
            }
        </style>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script src="<?= Site::APP_URL ?>js/slider/jquery.easing.1.3.min.js"></script>
        <script src="<?= Site::APP_URL ?>js/fitvids/jquery.fitvids.min.js"></script>
        <script src="<?= Site::APP_URL ?>js/jwerty/jwerty.js"></script>
        <script src="<?= Site::APP_URL ?>js/slider/trans-banner.min.js"></script>
        <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/md5.js"></script>
        <script src="<?= Site::APP_URL ?>js/retina.js"></script>
        <script src="<?= Site::APP_URL ?>js/jwerty-setup.js"></script>
        <script>
            $(document).ready(function() {
                $('.TB_Wrapper').TransBanner({
                    slide_transition: 1,
                    image_resize_to_fit: true,
                    caption_bg_color: '#000000',
                    caption_bg_opacity: 0.75,
                    caption_bg_blur: 3,
                    caption_width : 400,
                    mouse_hover_pause : true,
                    caption_float_mode : true
                });
                $(".videos").fitVids();
                
            });
        </script>
        <!--[if lt IE 9]>
                <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
                <script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js"></script>
        <![endif]-->
       <?php
            if (!$logged) {
            ?>
                <script type="text/javascript">

                    var _gaq = _gaq || [];
                    _gaq.push(['_setAccount', 'UA-37956304-1']);
                    _gaq.push(['_trackPageview']);

                    (function() {
                        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                    })();

                </script>
                <script type="text/javascript">

                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', 'UA-1473871-1']);
                _gaq.push(['_trackPageview']);

                (function() {
                  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();

              </script>
        <?php
            }
        ?>
    </head>

    <body>
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1&appId=410598095689639";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
        <!-- Page Layout HTML here -->
        <?= $navigation->to_html($logged) ?>
        <?= $header->to_html($logged) ?>
        <section id="content">
            <div class="container">
                <div class="row">
                    <div class="span5" id="news">
                        <h1>NEWS</h1>
                        <?php 
                            if($logged) { ?>
                        <a href="<?= Site::APP_URL . 'admin/news.php?action=new' ?>" class="btn btn-info btn-large"><i class="icon-white icon-file"></i> Nuova News</a>
                            <?php    
                            }
                            ?>
                        <a href="<?= Site::APP_URL ?>news/">Tutte le News</a>
                        <div class="wrapper">
                            <?php
                            if (count($news) > 0) {
                                foreach ($news as $n) {
                                    echo $n->to_html($logged);
                                }
                            } else {
                                echo '<p>Non ci sono news! :(</p>';
                            }
                            ?>
                        </div>
                    </div>
                    <div class="span4" id="video">
                        <?= $videos->to_html($logged) ?>
                    </div>
                    <div class="span3" id="info">
                        <?= $info->to_html($logged) ?>
                    </div>
                </div>
            </div>
        </section>
        <?= $patrocini->to_html($logged) ?>
        <?= $footer->to_html($logged) ?>

        <!-- Initialize JS Plugins -->
        <script src="<?= Site::APP_URL ?>bootstrap/js/bootstrap.min.js"></script>
    </body>
</html>